<script>on mouseUpput empty into bg fld PalmInfoif fld "Scout Rank" contains "Life" or fld "Scout Rank" contains ¬"Eagle" thenfillEmUpelseanswer "Scout is not even Life yet, I suggest you wait." with "OK" ¬or "Do it anyway"if it is "Do it anyway" thenfillEmUpend ifend ifend mouseUpon fillEmUplock screenset lockMessages to trueput fld Name into namepush cdsend mouseUp to bg btn "MB"put fld meritBadges into tempBadgespop cdput 0 into bCnt -- bronze mb countput 0 into sCnt -- silver mb countput 0 into gCnt -- gold mb countput 0 into uCnt -- unassigned mb countput 0 into tCnt -- total mb for palms countput "29,30,31,32,33,38,39,40,41,42,47,48,49,50,51" into bronzput "56,57,58,59,60,65,66,67,68,69,74,75,76,77,78" into goldput "84,85,86,87,88,94,95,96,97,98,104,105,106,107,108" into silverrepeat with i = 1 to 15put empty into bg fld id item i of bronzput empty into bg fld id item i of goldput empty into bg fld id item i of silverend repeatrepeat with i = 1 to the number of lines in tempBadgesset cursor to busyget line i of tempBadgesif char 5 of it is " " then next repeatif word 2 of it is "B" thendelete word 1 to 3 of itadd 1 to bCntif fld id item bCnt of bronz is empty thenput it into fld id item bCnt of bronzend ifend ifif word 2 of it is "G" thendelete word 1 to 3 of itadd 1 to gCntif fld id item gCnt of gold is empty thenput it into bg fld id item gCnt of goldend ifend ifif word 2 of it is "P" thendelete word 1 to 3 of itadd 1 to sCntif fld id item sCnt of silver is empty thenput it into bg fld id item sCnt of silverend ifend ifif word 2 of it is "•" thenadd 1 to uCntend ifend repeatput bCnt + sCnt + gCnt + uCnt into tCntput uCnt && "merit badges are unassigned" into bg fld PalmInfoif tCnt = 0 thenanswer "No extra merit badges have been earned." with "OK"exit fillEmUpend ifend fillEmUp</script>
</part>
<part>
<id>114</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>2</left>
<top>273</top>
<right>96</right>
<bottom>312</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>PalmInfo</name>
<script></script>
</part>
<part>
<id>115</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>3</left>
<top>226</top>
<right>96</right>
<bottom>248</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Count Palms</name>
<script>on mouseUplock screenput "36,45,54,63,72,81,91,101,111" into pFldsput 0 into pCountrepeat with i = 1 to 9if bg fld id item i of pFlds is not empty thenadd 1 to pCountend ifend repeatsend mouseUp to bg button aboutput pCount into bg fld PalmCountsend mouseUp to bg button Pplay boingend mouseUp</script>
</part>
<part>
<id>116</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>226</left>
<top>9</top>
<right>350</right>
<bottom>27</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>bold</textStyle>
<textHeight>16</textHeight>
<name>Plan</name>
<script>on mouseUpif me contains "New Plan" thenput "Old Plan" into meelseput "New Plan" into meend ifend mouseUp</script>